home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-portable.exe / quodlibet-3.3.0-portable / data / bin / io.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  3KB  |  89 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4. """The io module provides the Python interfaces to stream handling. The
  5. builtin open function is defined in this module.
  6.  
  7. At the top of the I/O hierarchy is the abstract base class IOBase. It
  8. defines the basic interface to a stream. Note, however, that there is no
  9. separation between reading and writing to streams; implementations are
  10. allowed to raise an IOError if they do not support a given operation.
  11.  
  12. Extending IOBase is RawIOBase which deals simply with the reading and
  13. writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
  14. an interface to OS files.
  15.  
  16. BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its
  17. subclasses, BufferedWriter, BufferedReader, and BufferedRWPair buffer
  18. streams that are readable, writable, and both respectively.
  19. BufferedRandom provides a buffered interface to random access
  20. streams. BytesIO is a simple stream of in-memory bytes.
  21.  
  22. Another IOBase subclass, TextIOBase, deals with the encoding and decoding
  23. of streams into text. TextIOWrapper, which extends it, is a buffered text
  24. interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
  25. is a in-memory stream for text.
  26.  
  27. Argument names are not part of the specification, and only the arguments
  28. of open() are intended to be used as keyword arguments.
  29.  
  30. data:
  31.  
  32. DEFAULT_BUFFER_SIZE
  33.  
  34.    An int containing the default buffer size used by the module's buffered
  35.    I/O classes. open() uses the file's blksize (as obtained by os.stat) if
  36.    possible.
  37. """
  38. __author__ = "Guido van Rossum <guido@python.org>, Mike Verdone <mike.verdone@gmail.com>, Mark Russell <mark.russell@zen.co.uk>, Antoine Pitrou <solipsis@pitrou.net>, Amaury Forgeot d'Arc <amauryfa@gmail.com>, Benjamin Peterson <benjamin@python.org>"
  39. __all__ = [
  40.     'BlockingIOError',
  41.     'open',
  42.     'IOBase',
  43.     'RawIOBase',
  44.     'FileIO',
  45.     'BytesIO',
  46.     'StringIO',
  47.     'BufferedIOBase',
  48.     'BufferedReader',
  49.     'BufferedWriter',
  50.     'BufferedRWPair',
  51.     'BufferedRandom',
  52.     'TextIOBase',
  53.     'TextIOWrapper',
  54.     'UnsupportedOperation',
  55.     'SEEK_SET',
  56.     'SEEK_CUR',
  57.     'SEEK_END']
  58. import _io
  59. import abc
  60. from _io import DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation, open, FileIO, BytesIO, StringIO, BufferedReader, BufferedWriter, BufferedRWPair, BufferedRandom, IncrementalNewlineDecoder, TextIOWrapper
  61. OpenWrapper = _io.open
  62. SEEK_SET = 0
  63. SEEK_CUR = 1
  64. SEEK_END = 2
  65.  
  66. class IOBase(_io._IOBase):
  67.     __metaclass__ = abc.ABCMeta
  68.  
  69.  
  70. class RawIOBase(_io._RawIOBase, IOBase):
  71.     pass
  72.  
  73.  
  74. class BufferedIOBase(_io._BufferedIOBase, IOBase):
  75.     pass
  76.  
  77.  
  78. class TextIOBase(_io._TextIOBase, IOBase):
  79.     pass
  80.  
  81. RawIOBase.register(FileIO)
  82. for klass in (BytesIO, BufferedReader, BufferedWriter, BufferedRandom, BufferedRWPair):
  83.     BufferedIOBase.register(klass)
  84.  
  85. for klass in (StringIO, TextIOWrapper):
  86.     TextIOBase.register(klass)
  87.  
  88. del klass
  89.